# -*- coding: utf-8 -*- 
#
# Description:
#
#  Definiton
#
#
#
# Changes:
#
# 2012-01-10
# Initial Commit
#
#
# Copyright 2010-2012, WyDev Team.
# Author: Polo35 (polo35580@hotmail.fr)
#
# Licenced under Academic Free License version 3.0
# Review WyGui README & LICENSE files for further details.

nname: 98
n 98(None)[return version
]:
	i: 88(t), 94()
	o: 

nname: 94
n 94(None)[]:
	i: 88(f)
	o: 98()

nname: 88
n 88(version)[]:
	i: 3(), 60(), 86(AE)
	o: 94(f), 98(t)

nname: 86
n 86(None)[]:
	i: 50(f)
	o: 88(AE)

nname: 60
n 60(None)[log.error('Unable to retrieve Wybox version.')
version = None
]:
	i: 50(t)
	o: 88()

nname: 50
n 50(<dummy_ex3> EXC_MATCH IOError)[]:
	i: 0(except)
	o: 60(t), 86(f)

nname: 3
n 3(None)[ver_file = open('/etc/wybox-release', 'r')
version = ver_file.readline().strip()
ver_file.close()
]:
	i: 0(try)
	o: 88()

nname: 0
n 0(None)[]:
	i: 
	o: 3(try), 50(except)

nname: 98
n 98(None)[return version
]:
	i: 50(t)
	o: 

nname: 50
n 50(None)[except IOError:
	log.error('Unable to retrieve Wybox version.')
	version = None
if not version:
	pass
]:
	i: 0()
	o: 98()

nname: 0
n 0(None)[try:
	ver_file = open('/etc/wybox-release', 'r')
	version = ver_file.readline().strip()
	ver_file.close()
]:
	i: 
	o: 50()

nname: 98
n 98(None)[return version
]:
	i: 0(t)
	o: 

nname: 0
n 0(None)[try:
	ver_file = open('/etc/wybox-release', 'r')
	version = ver_file.readline().strip()
	ver_file.close()
except IOError:
	log.error('Unable to retrieve Wybox version.')
	version = None
if not version:
	pass
]:
	i: 
	o: 98()

nname: 0
n 0(None)[try:
	ver_file = open('/etc/wybox-release', 'r')
	version = ver_file.readline().strip()
	ver_file.close()
except IOError:
	log.error('Unable to retrieve Wybox version.')
	version = None
if not version:
	pass
return version
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb76254ec>}
nname: 107
n 107(None)[return serial
]:
	i: 97(t), 103()
	o: 

nname: 103
n 103(None)[]:
	i: 97(f)
	o: 107()

nname: 97
n 97(serial)[]:
	i: 3(), 69(), 95(AE)
	o: 103(f), 107(t)

nname: 95
n 95(None)[]:
	i: 59(f)
	o: 97(AE)

nname: 69
n 69(None)[serial = None
log.error('Unable to retrieve serial number.')
]:
	i: 59(t)
	o: 97()

nname: 59
n 59(<dummy_ex3> EXC_MATCH IOError)[]:
	i: 0(except)
	o: 69(t), 95(f)

nname: 3
n 3(None)[ser_file = open('/proc/wybox/SN', 'r')
serial = ser_file.readline().strip().lstrip('0')
ser_file.close()
]:
	i: 0(try)
	o: 97()

nname: 0
n 0(None)[]:
	i: 
	o: 3(try), 59(except)

nname: 107
n 107(None)[return serial
]:
	i: 59(t)
	o: 

nname: 59
n 59(None)[except IOError:
	serial = None
	log.error('Unable to retrieve serial number.')
if not serial:
	pass
]:
	i: 0()
	o: 107()

nname: 0
n 0(None)[try:
	ser_file = open('/proc/wybox/SN', 'r')
	serial = ser_file.readline().strip().lstrip('0')
	ser_file.close()
]:
	i: 
	o: 59()

nname: 107
n 107(None)[return serial
]:
	i: 0(t)
	o: 

nname: 0
n 0(None)[try:
	ser_file = open('/proc/wybox/SN', 'r')
	serial = ser_file.readline().strip().lstrip('0')
	ser_file.close()
except IOError:
	serial = None
	log.error('Unable to retrieve serial number.')
if not serial:
	pass
]:
	i: 
	o: 107()

nname: 0
n 0(None)[try:
	ser_file = open('/proc/wybox/SN', 'r')
	serial = ser_file.readline().strip().lstrip('0')
	ser_file.close()
except IOError:
	serial = None
	log.error('Unable to retrieve serial number.')
if not serial:
	pass
return serial
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb762562c>}
nname: 0
n 0(None)[return '.'.join(<genexpr>(version.split('.')))
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb761ee8c>}
nname: 0
n 0(None)[from __future__ import absolute_import
from peewee.debug import log
def wybox_version():
	try:
		ver_file = open('/etc/wybox-release', 'r')
		version = ver_file.readline().strip()
		ver_file.close()
	except IOError:
		log.error('Unable to retrieve Wybox version.')
		version = None
	if not version:
		pass
	return version

def serial_number():
	try:
		ser_file = open('/proc/wybox/SN', 'r')
		serial = ser_file.readline().strip().lstrip('0')
		ser_file.close()
	except IOError:
		serial = None
		log.error('Unable to retrieve serial number.')
	if not serial:
		pass
	return serial

def format_version(version):
	return '.'.join(<genexpr>(version.split('.')))

]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb761e8ec>}
from __future__ import absolute_import
from peewee.debug import log
def wybox_version():
	try:
		ver_file = open('/etc/wybox-release', 'r')
		version = ver_file.readline().strip()
		ver_file.close()
	except IOError:
		log.error('Unable to retrieve Wybox version.')
		version = None
	if not version:
		pass
	return version

def serial_number():
	try:
		ser_file = open('/proc/wybox/SN', 'r')
		serial = ser_file.readline().strip().lstrip('0')
		ser_file.close()
	except IOError:
		serial = None
		log.error('Unable to retrieve serial number.')
	if not serial:
		pass
	return serial

def format_version(version):
	return '.'.join(<genexpr>(version.split('.')))

